﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Smartmanufact
{
    public partial class DeleteUserConfig : Form
    {
        public string originname = "";
        public DeleteUserConfig()
        {
            InitializeComponent();
        }

        private void DeleteUserConfig_Load(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                MainView.mysql.excute_sql("Delete from usertable where username='"+originname+"'");
                this.Dispose();
            }
            catch
            {
                MessageBox.Show("删除出现错误！");
            }
        }
    }
}
